<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var arr = [1, 3, 5, 11, 15, 19]
      arr.forEach((currentValue, index, array) => {
        console.log(currentValue, index, array)
        // 参数一：当前数组中元素；参数二：索引； 参数三：当前数组
      })
      const arr1 = arr.map((item) => {
        return item > 10
      })
      console.log(arr1)[(false, false, false, true, true, true)]
      var ages = [3, 18, 21, 27]
      function checkAdult(age) {
        return age >= 18
      }
      ages.find(checkAdult) //18
      console.log(ages.find(checkAdult))
      ages.every(checkAdult) //false
      console.log(ages.every(checkAdult))
      ages.some(checkAdult) //true
      console.log(ages.some(checkAdult))
      ages.filter(checkAdult) //[18,21,27]
      console.log(ages.filter(checkAdult))
    </script>
  </body>
</html>
